package com.yanqu.road.entity.union.huaben;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.FieldTypeAnnotation;

import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

@FieldTypeAnnotation(tableName = "t_c_hua_ben_pass_week", desc = "商会话本-关卡数据")
public class UnionHuaBenPassWeekData extends DataObject {

    @FieldTypeAnnotation(desc = "商会uid", update = true, select = true)
    private String unionUid;

    @FieldTypeAnnotation(desc = "周id", update = true)
    private int weekId;

    @FieldTypeAnnotation(desc = "玩家区服id")
    private long serverId;

    @FieldTypeAnnotation(desc = "难度")
    private int degree;

    @FieldTypeAnnotation(desc = "开启时间")
    private int openTime;

    @FieldTypeAnnotation(desc = "结算时间")
    private int closeTime;

    @FieldTypeAnnotation(desc = "最后过关时间")
    private int lastPassTime;

    @FieldTypeAnnotation(desc = "持续时间:有效期")
    private int duration;

    @FieldTypeAnnotation(desc = "评价")
    private int pingJia;

    @FieldTypeAnnotation(desc = "关卡数据")
    private List<UnionHuaBenPass> passList = new ArrayList<>();


    public String getUnionUid() {
        return unionUid;
    }

    public void setUnionUid(String unionUid) {
        if(!Objects.equals(this.unionUid, unionUid)) {
            this.unionUid = unionUid;
            setUpdateOption();
        }
    }

    public int getWeekId() {
        return weekId;
    }

    public void setWeekId(int weekId) {
        if(this.weekId != weekId) {
            this.weekId = weekId;
            setUpdateOption();
        }
    }

    public long getServerId() {
        return serverId;
    }

    public void setServerId(long serverId) {
        if(this.serverId != serverId) {
            this.serverId = serverId;
            setUpdateOption();
        }
    }

    public int getDegree() {
        return degree;
    }

    public void setDegree(int degree) {
        if(this.degree != degree) {
            this.degree = degree;
            setUpdateOption();
        }
    }

    public int getOpenTime() {
        return openTime;
    }

    public void setOpenTime(int openTime) {
        if(this.openTime != openTime) {
            this.openTime = openTime;
            setUpdateOption();
        }
    }

    public int getCloseTime() {
        return closeTime;
    }

    public void setCloseTime(int closeTime) {
        if(this.closeTime != closeTime) {
            this.closeTime = closeTime;
            setUpdateOption();
        }
    }

    public int getLastPassTime() {
        return lastPassTime;
    }

    public void setLastPassTime(int lastPassTime) {
        if(this.lastPassTime != lastPassTime) {
            this.lastPassTime = lastPassTime;
            setUpdateOption();
        }
    }

    public int getDuration() {
        return duration;
    }

    public void setDuration(int duration) {
        if(this.duration != duration) {
            this.duration = duration;
            setUpdateOption();
        }
    }

    public int getPingJia() {
        return pingJia;
    }

    public void setPingJia(int pingJia) {
        if(this.pingJia != pingJia) {
            this.pingJia = pingJia;
            setUpdateOption();
        }
    }

    public List<UnionHuaBenPass> getPassList() {
        return passList;
    }

    public void setPassList(List<UnionHuaBenPass> passList) {
        this.passList = passList;
        setUpdateOption();
    }
}
